﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucComment" TagName="Comment" Src="../Common/Inc/Comment.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Car2011r.aspx.cs" Inherits="Updms.Car.Car2011r" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %>
<%@ Register Assembly="ChartFX.WebForms.Adornments" Namespace="ChartFX.WebForms.Adornments" TagPrefix="chartfxadornments" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms.Galleries" TagPrefix="chartfx7galleries" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Car2011r] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->	
		</td>
	</tr>
	<tr>
		<td id="menu_area">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->	
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Car2011r" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<Triggers>
				<asp:PostBackTrigger ControlID="ibtn_excel"/>
			</Triggers>
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_chart" Text="챠트" runat="server" CssClass="ibtn ibtn_chart" OnClientClick="return chkSearch(event)" OnClick="ibtn_chart_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl" width="11%"><asp:Literal ID="ltr_search_car_id" Text="차량" runat="server" /></td>
					<td class="ctl" width="22%"><asp:dropdownlist id="ddl_search_car_id" runat="server" CssClass="ddl" OnSelectedIndexChanged="ddl_search_car_id_SelectedIndexChanged"></asp:dropdownlist></td>
					<td class="lbl" width="11%"><asp:Literal ID="ltr_search_last_service_info" Text="마지막 정비" runat="server" /></td>
					<td class="ctl" width="22%"><asp:label id="lbl_search_last_service_info" Width="100%" runat="server"></asp:label></td>
					<td class="lbl" width="11%"><asp:Literal ID="ltr_search_curr_distance" Text="조회누적거리" runat="server" /></td>
					<td class="ctl" width="22%"><asp:textbox id="txt_search_curr_distance" runat="server" Width="98%" CssClass="ib_b_R req"></asp:textbox></td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 챠트 시작 -->
			<table id="table_chart" class="default"  runat="server">
				<tr>
					<td width="50%"><div class="sub_title_icon"><asp:Literal ID="ltr_stitle_insp" Text="점검기준" runat="server" /></div></td>
					<td width="50%"><div class="sub_title_icon"><asp:Literal ID="ltr_stitle_change" Text="교환기준" runat="server" /></div></td>
				</tr>
				<tr>
					<td class="td_box">
						<chartfx7:Chart ID="chart_check" runat="server" Height="500px" Palette="DarkPastels.Pastels" Width="520px" ImageSettings-Interactive="False">
							<AxisY Title-Text="거리 (㎞)">
								<Grids Major-Style="Dash" Interlaced="True"></Grids>
								<LabelsFormat CustomFormat="###,###,##0" />
							</AxisY>

							<AxisX Title-Text="">
							<Grids Major-Visible="False"></Grids>
							</AxisX>

							<MainPane AxisY-Title-Text="거리 (㎞)"></MainPane>
							<SpecialObjects>
								<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
									Type="None">
								</chartfxadornments:SimpleBorder>
								<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
									ColorFrom="Transparent" EffectArea="0">
								</chartfxadornments:GradientBackground>
								<chartfx7galleries:Bar>
								</chartfx7galleries:Bar>
							</SpecialObjects>
							<Series>
								<chartfx7:SeriesAttributes Text="남은점검거리" />
								<chartfx7:SeriesAttributes Stacked="True" Text="점검후 누적거리" />
								<chartfx7:SeriesAttributes />
							</Series>
							<AllSeries Gallery="Gantt" BarShape="Cylinder">
							</AllSeries>
							<LegendBox Dock="Top">
							</LegendBox>
							</chartfx7:Chart>
					</td>
					<td class="td_box">
						<chartfx7:Chart ID="chart_change" runat="server" Height="500px" Palette="DarkPastels.Pastels" Width="520px" ImageSettings-Interactive="False">
							<AxisY Title-Text="거리 (㎞)">
								<Grids Major-Style="Dash" Interlaced="True"></Grids>
								<LabelsFormat CustomFormat="###,###,##0" />
							</AxisY>

							<AxisX Title-Text="">
							<Grids Major-Visible="False"></Grids>
							</AxisX>

							<MainPane AxisY-Title-Text="거리 (㎞)"></MainPane>
							<SpecialObjects>
								<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
									Type="None">
								</chartfxadornments:SimpleBorder>
								<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
									ColorFrom="Transparent" EffectArea="0">
								</chartfxadornments:GradientBackground>
								<chartfx7galleries:Bar>
								</chartfx7galleries:Bar>
							</SpecialObjects>
							<Series>
								<chartfx7:SeriesAttributes Text="남은교환거리" />
								<chartfx7:SeriesAttributes Stacked="True" Text="교환후 누적거리" />
								<chartfx7:SeriesAttributes />
							</Series>
							<AllSeries Gallery="Gantt" BarShape="Cylinder">
							</AllSeries>
							<LegendBox Dock="Top">
							</LegendBox>
							</chartfx7:Chart>
						</td>			
				</tr>
			</table>
			<!-- 챠트 끝 -->
			<br>
			<!-- 리스트셋 시작 -->
			<table id="table_list_set" cellpadding="0" cellspacing="0" border="0" width="100%" runat="server">
				<tr>
					<td height="20" align="right" style="padding-bottom:2px;">
						<span style="background-color:#FFFFA0;padding:2px;border:1px solid #DEDEDE;"><asp:Literal ID="ltr_stitle_need_comment" Text="곧 점검(교환)이 필요합니다" runat="server" /></span>
						<span style="background-color:#FFC0C0;padding:2px;border:1px solid #DEDEDE;"><asp:Literal ID="ltr_stitle_pass_comment" Text="점검(교환) 시점이 지났습니다" runat="server" /></span>
					</td>
				</tr>
				<tr>
					<td>
						<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="Check_Distance_Status, Change_Distance_Status">
							<Columns>
								<asp:BoundField DataField="Rnum" HeaderText="번호" >
									<ItemStyle HorizontalAlign="Center" Width="4%" />
								</asp:BoundField>
								<asp:BoundField DataField="Car_Nm" HeaderText="차량" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="10%" />
								</asp:BoundField>
								<asp:BoundField DataField="Parts_Nm" HeaderText="부품" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" Width="26%" />
								</asp:BoundField>
								<asp:BoundField DataField="Check_Distance" HeaderText="점검기준거리(㎞)" HtmlEncode="False" DataFormatString="{0:###,##0}" >
									<ItemStyle HorizontalAlign="Right" Width="8%" />
								</asp:BoundField>
								<asp:BoundField DataField="Change_Distance" HeaderText="교환기준거리(㎞)" HtmlEncode="False" DataFormatString="{0:###,##0}" >
									<ItemStyle HorizontalAlign="Right" Width="8%" />
								</asp:BoundField>
								<asp:BoundField DataField="Service_Dt" HeaderText="마지막정비일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" Width="10%" />
								</asp:BoundField>
								<asp:BoundField DataField="Distance" HeaderText="누적주행거리(㎞)" HtmlEncode="False" DataFormatString="{0:###,##0}">
									<ItemStyle HorizontalAlign="Right" Width="8%" />
								</asp:BoundField>
								<asp:BoundField DataField="Std_Distance" HeaderText="기준누적거리" HtmlEncode="False" DataFormatString="{0:###,##0}">
									<ItemStyle HorizontalAlign="Right" Width="8%" />
								</asp:BoundField>							
								<asp:BoundField DataField="Remain_Check_Distance" HeaderText="남은점검거리" HtmlEncode="False" DataFormatString="{0:###,##0}" >
									<ItemStyle HorizontalAlign="Right" Width="8%" />
								</asp:BoundField>
								<asp:BoundField DataField="Remain_Change_Distance" HeaderText="남은교환거리" HtmlEncode="False" DataFormatString="{0:###,##0}" >
									<ItemStyle HorizontalAlign="Right" Width="8%" />
								</asp:BoundField>
								<asp:BoundField DataField="Check_Distance_Status" HeaderText="Check_Distance_Status(X)" Visible="False" />
								<asp:BoundField DataField="Change_Distance_Status" HeaderText="Change_Distance_Status(X)" Visible="False" />
							</Columns>							
						</asp:GridView>
					</td>			
				</tr>
			</table>
			<!-- 리스트셋 끝 -->
			<!-- 설명 시작 -->
				<ucComment:Comment id="Comment" runat="server" TagPrefixs="Car2011r"></ucComment:Comment>
			<!-- 설명 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
				<asp:label id="lbl_pk" runat="server"></asp:label>
				<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			</div>
			<!-- 히든값 끝 -->
			<!-- FilteredTextBoxExtender 시작 -->
			<act:FilteredTextBoxExtender ID="fte_search_curr_distance"
				runat="server"
				TargetControlID="txt_search_curr_distance"
				FilterType="Custom, Numbers"
				ValidChars=",">
			</act:FilteredTextBoxExtender>
			<!-- FilteredTextBoxExtender 끝 -->
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>	
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>
<script type="text/javascript" language="javascript" defer="defer">
	//검색
	function chkSearch(evt) {
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;

		if ($F("txt_search_curr_distance").blank()) {
			msgBox.alert(getMsg(MSG_ERR_098), setFocus, "txt_search_curr_distance", keyCode);	// 조회누적거리를 입력해주세요
			return false;
		}
		return true;
	}

	//엔터검색
	function enterSearchOnPage(evt) {
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;

		if (keyCode == 13) {
			if (chkSearch(evt)) {
				__doPostBack('ibtn_chart', '');
			}
		}
	}
	
</script>
</body>
</html>